instantiate list C#

32

instantiate list C# -

var list = new List<string> {
  "test1",
  "test2",
  "test3"
};

instantiate list C# -

List<string> mylist = new List<string>(new string[] { "element1", "element2", "element3" });

Comments

Submit
0 Comments